# system
import wsgiref.handlers

# appengine
from google.appengine.ext import webapp

# local files
import admin_page
import base
import home_page
import onebox_feed_page
import search_page
import upload_page
import loader_page

def main():
  application = webapp.WSGIApplication(
                                       [('/admin', admin_page.AdminPage),
                                        ('/delete', admin_page.Delete),
                                        ('/main', home_page.HomePage),
                                        ('/onebox_feed.tsv', onebox_feed_page.OneBoxFeedPage),
                                        ('/insert', admin_page.Insert),
                                        ('/load', loader_page.LoaderPage),
                                        ('/search', search_page.SearchPage),
                                        ('/setsnapshot', admin_page.SetSnapshot),
                                        ('/upload', upload_page.UploadPage)],
                                       debug=True)
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
  main()
